<template>
	<view class="content">
    <van-button round type="info" size="large">创建空闲时间</van-button>
	</view>
</template>

<style lang="scss" scoped>
	.content {
		display: flex;
		flex-direction: column;
		height: 100vh; /* 填满整个视口高度 */
	}
</style>
<script setup lang="ts">
import {ref} from 'vue'
import {onLoad} from "@dcloudio/uni-app";
import {getSetting} from "@/service/api";
import {useSettingStore} from "@/store";
import {login} from "@/service/api"

const settingStore = useSettingStore()
let account = ref('')
let password = ref('')
let top_height = ref('16rem')
onLoad(() => {
	autoHeight();
})

const autoHeight = () => {
	let height = uni.getSystemInfoSync().windowHeight;
	if (height < 620) {
		top_height = height - 233.17 - 52 + 'px';
	}
}

const logins = () => {
	let loginData = {
		username: account.value,
		password: password.value,
	}
	login(loginData).then((res: any) => {
		uni.setStorageSync("token",res.data.token)
		uni.redirectTo({
			url: '/pages/index/main'
		});
	})
}
</script>

